package com.anti.commom.core.utils.supports;

import java.util.HashMap;

/**
 * @Description TODO
 * @Author anTi
 * @Date 2020-10-7
 */

public class ParamMap extends HashMap<String, Object> {
    private static final long serialVersionUID = 1L;

    public ParamMap() {
    }

    public Integer getInt(String key) {
        Object value = this.get(key);
        return value == null ? null : Integer.parseInt(value.toString());
    }

    public Long getLong(String key) {
        Object value = this.get(key);
        return value == null ? null : Long.parseLong(value.toString());
    }

    public Double getDouble(String key) {
        Object value = this.get(key);
        return value == null ? null : Double.parseDouble(value.toString());
    }

    public Float getFloat(String key) {
        Object value = this.get(key);
        return value == null ? null : Float.parseFloat(value.toString());
    }

    public String getString(String key) {
        Object value = this.get(key);
        return value == null ? null : value.toString();
    }
}

